<template>
	<!-- 进度条 -->
	<view class="jdt_body">
		<view class="main">
			<view class="sub" :style="jdNum">
			</view>
			<text class="texting">
				下载中 {{jdtNumber}}%
			</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "progress_bar",
		props: {
			jdtNumber: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {};
		},
		computed: {
			jdNum() {
				let newNum = 500 / 100 * this.jdtNumber
				return 'width :' + newNum + 'rpx'
			}
		}
	}
</script>

<style lang="scss" scoped>
	.jdt_body {
		// width: 750rpx;
		// height: 1000rpx;
		// background-color: rgba(0, 0, 0, 0.3);
		// position: fixed;
		// top: 0;
		// z-index: 99999;
		// display: flex;
		// flex-direction: row;
		// justify-content: center;
	}

	.main {
		width: 500rpx;
		height: 40rpx;
		border-radius: 20rpx;
		background-color: white;
		margin-top: 800rpx;

		display: flex;
		justify-content: center;
		align-items: center;
		position: relative;
	}

	.sub {
		position: absolute;
		top: 0;
		left: 0;

		background: linear-gradient(180deg, #fd8878, #fc0010);
		height: 40rpx;
		border-radius: 20rpx;

	}

	.texting {


		font-size: 20rpx;
		color: #999;
	}
</style>